<html><head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta content="text/javascript" http-equiv="content-script-type">
<title>tango.util.container.more.Stack</title>

<link rel="stylesheet" type="text/css" href="css/style.css">
<!--[if lt IE 7]><link rel="stylesheet" type="text/css" href="css/ie56hack.css"><![endif]-->
<script language="JavaScript" src="js/util.js" type="text/javascript"></script>
<script language="JavaScript" src="js/tree.js" type="text/javascript"></script>
<script language="JavaScript" src="js/explorer.js" type="text/javascript"></script>
<script>
function anchorFromTitle(title, path, ext) {
  var url = path + title + "." + ext;
  document.write("<a href='" + url + "'>" + title + "</a>");
  }
</script>
</head><body>
<div id="tabarea"></div><div id="explorerclient"></div>
<div id="content"><script>explorer.initialize("tango.util.container.more.Stack");</script>
        <table class="content">
                <tr><td id="docbody"><h1><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/container/more/Stack.d?rev=3791">tango.util.container.more.Stack</a></h1>
                
<b>License:</b><br>
BSD style: see <a href="http://www.dsource.org/projects/tango/wiki/LibraryLicense">license.txt</a><br><br>
<b>Version:</b><br>
Initial release: April 2008<br><br>
<b>author:</b><br>Kris<br><br>
<b>Since:</b><br>0.99.7<br><br>
<dl>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>struct <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/container/more/Stack.d?rev=3791#L26">Stack</a></span>
<script>explorer.outline.addDecl('Stack');</script>(V, int Size);</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">A stack of the given value-type V, with maximum depth Size. Note
        that this does not generate any heap activity</font><br><br>
<dl>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>void <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/container/more/Stack.d?rev=3791#L43">clear</a></span>
<script>explorer.outline.addDecl('clear');</script>();</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Clear the stack</font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>uint <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/container/more/Stack.d?rev=3791#L54">size</a></span>
<script>explorer.outline.addDecl('size');</script>();</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Return depth of the stack</font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>uint <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/container/more/Stack.d?rev=3791#L65">unused</a></span>
<script>explorer.outline.addDecl('unused');</script>();</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Return remaining unused slots</font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>Stack <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/container/more/Stack.d?rev=3791#L76">clone</a></span>
<script>explorer.outline.addDecl('clone');</script>();</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Returns a &#40;shallow&#41; clone of this stack, on the stack</font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>V <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/container/more/Stack.d?rev=3791#L90">dup</a></span>
<script>explorer.outline.addDecl('dup');</script>();</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Push and return a &#40;shallow&#41; copy of the topmost element</font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>void <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/container/more/Stack.d?rev=3791#L105">push</a></span>
<script>explorer.outline.addDecl('push');</script>(V <span class="funcparam">value</span>);</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Push a value onto the stack.</font><br><br>
<font color="black">Throws an exception when the stack is full<br><br></font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>void <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/container/more/Stack.d?rev=3791#L121">pushMore</a></span>
<script>explorer.outline.addDecl('pushMore');</script>(V[] <span class="funcparam">value</span>...);</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Push a series of values onto the stack.</font><br><br>
<font color="black">Throws an exception when the stack is full<br><br></font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>V <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/container/more/Stack.d?rev=3791#L135">pop</a></span>
<script>explorer.outline.addDecl('pop');</script>();</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Remove and return the most recent addition to the stack.</font><br><br>
<font color="black">Throws an exception when the stack is empty<br><br></font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>V <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/container/more/Stack.d?rev=3791#L151">top</a></span>
<script>explorer.outline.addDecl('top');</script>();</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Return the most recent addition to the stack.</font><br><br>
<font color="black">Throws an exception when the stack is empty<br><br></font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>V <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/container/more/Stack.d?rev=3791#L167">swap</a></span>
<script>explorer.outline.addDecl('swap');</script>();</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Swaps the top two entries, and return the top</font><br><br>
<font color="black">Throws an exception when the stack has insufficient entries<br><br></font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>V <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/container/more/Stack.d?rev=3791#L189">nth</a></span>
<script>explorer.outline.addDecl('nth');</script>(uint <span class="funcparam">i</span>);</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Index stack entries, where a zero index represents the
                newest stack entry &#40;the top&#41;.</font><br><br>
<font color="black">Throws an exception when the given index is out of range<br><br></font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>void <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/container/more/Stack.d?rev=3791#L205">rotateLeft</a></span>
<script>explorer.outline.addDecl('rotateLeft');</script>(uint <span class="funcparam">d</span>);</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Rotate the given number of stack entries </font><br><br>
<font color="black">Throws an exception when the number is out of range<br><br></font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>void <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/container/more/Stack.d?rev=3791#L227">rotateRight</a></span>
<script>explorer.outline.addDecl('rotateRight');</script>(uint <span class="funcparam">d</span>);</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Rotate the given number of stack entries </font><br><br>
<font color="black">Throws an exception when the number is out of range<br><br></font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>V[] <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/container/more/Stack.d?rev=3791#L251">slice</a></span>
<script>explorer.outline.addDecl('slice');</script>();</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Return the stack as an array of values, where the first
                array entry represents the oldest value. 
                
                Doing a foreach&#40;&#41; on the returned array will traverse in
                the opposite direction of foreach&#40;&#41; upon a stack
                 
</font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>V <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/container/more/Stack.d?rev=3791#L262">error</a></span>
<script>explorer.outline.addDecl('error');</script>(size_t <span class="funcparam">line</span>); [private]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Throw an exception</font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>int <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/container/more/Stack.d?rev=3791#L273">opApply</a></span>
<script>explorer.outline.addDecl('opApply');</script>(int delegate(ref V value) <span class="funcparam">dg</span>);</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Iterate from the most recent to the oldest stack entries</font><br><br></dd></dl></dd></dl></td></tr>
                <tr><td id="docfooter">
                        Copyright (c) 2008 Kris Bell. All rights reserved :: page rendered by CandyDoc. Generated by <a href="http://code.google.com/p/dil">dil</a> on Sat Aug  2 16:08:33 2008.
                </td></tr>
        </table>
</div>
<script></script>
</body></html>